package com.eati.cm.repo;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.eati.cm.model.ThirdPartyAccount;
import com.eati.cm.model.readonly.useless_for_fe.LoginPlatform;

@Repository
public interface ThirdPartyAccountRepo extends JpaRepository<ThirdPartyAccount, Long>{
	@Query(value = "SELECT o FROM #{#entityName} o WHERE o.loginPlatform = ?1 AND o.thirdUsrId = ?2")
	ThirdPartyAccount findByLoginPlatformAndThirdUsrId(LoginPlatform lp, String tuid);
}
